<ion-header>

  <ion-navbar>
    <ion-buttons start>
      <button ion-button icon-only (click)="goHome()">
        <ion-icon name="ios-home"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>个人中心</ion-title>
    <ion-buttons end>
      <button ion-button icon-only [navPush]="'SettingPage'">
        <ion-icon name="ios-settings"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <ion-list margin-bottom>
    <ion-item [navPush]="'SettingPage'" class="b0">
      <ion-avatar item-start>
        <img src="../../assets/imgs/logo.png" style="width: 70px;height: 70px;" alt="logo">
      </ion-avatar>
      <h2 class="color-gold">BOSS CHAIN</h2>
      <h3>账户：{{userInfo?.account}}（{{userInfo?.leader | enumName: userType}}）</h3>
      <p class="color-gray-light" *ngIf="userInfo?.star === 1">我的级别：<span class="color-blue">一星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 2">我的级别：<span class="color-cyan">二星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 3">我的级别：<span class="color-purple">三星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 4">我的级别：<span class="color-pink">四星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 5">我的级别：<span class="color-orange">五星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 6">我的级别：<span class="color-red">六星</span></p>
      <p class="color-gray-light" *ngIf="userInfo?.star === 7">我的级别：<span class="color-gold">七星</span></p>
    </ion-item>
  </ion-list>

  <!--账户信息-->
  <ion-item-group class="item-list">
    <ion-item-divider><span class="color-gray-light">账户信息</span></ion-item-divider>
    <ion-item>
      <ion-grid>
        <ion-row class="text-center">
          <ion-col col-6>
            <h3 class="mb">冻结押金</h3>
            <h2 class="color-green mb0">{{(myData?.deposit || 0) | number: '1.2-2'}}</h2></ion-col>
          <ion-col col-6>
            <h3 class="mb">未领取矿石</h3>
            <h2 class="color-green mb0">{{(accountData?.unclaimed || 0) | number: '1.2-2'}}</h2></ion-col>
        </ion-row>
      </ion-grid>
    </ion-item>
    <!--账户信息-->
    <account [refresh]="isRefreshAccount"></account>
  </ion-item-group>

  <!--账户操作-->
  <ion-item-group class="item-list" margin-top margin-bottom>
    <button ion-item [navPush]="'SubAccountPage'">
      <ion-icon name="ios-person-add" item-start></ion-icon>
      我的子账户
    </button>
    <button ion-item (click)="isReactive()">
      <ion-icon name="md-refresh" item-start></ion-icon>
      动态复投
    </button>
    <button ion-item [navPush]="'GroupPage'" *ngIf="userInfo?.leader !== userTypes.member">
      <ion-icon name="ios-people" item-start></ion-icon>
      我的团队
    </button>
    <button ion-item [navPush]="'InvitePage'">
      <ion-icon name="md-share" item-start></ion-icon>
      推广
    </button>
    <button ion-item [navPush]="'TransferPage'">
      <ion-icon name="redo" item-start></ion-icon>
      转账
    </button>
    <button ion-item [navPush]="'FinanceRecordPage'">
      <ion-icon name="ios-list-box-outline" item-start></ion-icon>
      财务记录
    </button>
  </ion-item-group>

</ion-content>
